--编写者：alt
--功能介绍：加载物品资源
--使用方法：直接粘贴 增加itemtable内的内容 例如{"aaa","bbb"}
--"images/inventoryimages/" .. v .. ".xml" 对应位置需要有图
--这样注册需要保证prefab和图一样的名

local itemtable = {

}
local tab = {}
for k, v in pairs(itemtable) do
    table.insert(Assets, Asset("ATLAS", "images/inventoryimages/" .. v .. ".xml"))
    table.insert(Assets, Asset("IMAGE", "images/inventoryimages/" .. v .. ".tex"))
    table.insert(Assets, Asset("ATLAS_BUILD", "images/inventoryimages/" .. v .. ".xml", 256))
    RegisterInventoryItemAtlas("images/inventoryimages/" .. v .. ".xml", v .. ".tex")

    tab[v] = resolvefilepath_soft("images/inventoryimages/" .. v .. ".xml")
end
local DrawingTool = require("components/drawingtool")
local oldGetImageToDraw = DrawingTool.GetImageToDraw
function DrawingTool:GetImageToDraw(target)
    local image, ent, atlas, bgimage, bgatlas = oldGetImageToDraw(self, target)
    if image and tab[image] then
        atlas = tab[image]
    end
    return image, ent, atlas, bgimage, bgatlas
end

local minimaplist = {

}
for k, v in pairs(minimaplist) do
    table.insert(Assets, Asset("ATLAS", "images/map_icons/" .. v .. ".xml"))
    AddMinimapAtlas("images/map_icons/" .. v .. ".xml")
end
